<template>
  <div>
    <my-header></my-header>
    <div class="in_shop">
      <div class="content_title">
        <router-link to="/"> 首页 ></router-link>
        <router-link to="/wrindex"> 结婚商城 ></router-link>
        <span>{{ shopshow[0].biaoti }}</span>
      </div>
      <div class="content_top">
        <div class="inbard">
          <img v-show="img1"
            :src="shopshow[0].barimg1"
            alt=""
          />
          <img v-show="img2"
            :src="shopshow[0].barimg2"
            alt=""
          />
          <img v-show="img3"
            :src="shopshow[0].barimg3"
            alt=""
          />
        </div>
        <div>
          <div @mouseenter="inbar(1)" class="inbarx">
            <img
              :src="shopshow[0].barimg1"
              alt=""
            />
          </div>
          <div @mouseenter="inbar(2)" class="inbarx">
            <img
               :src="shopshow[0].barimg2"
              alt=""
            />
          </div>
          <div @mouseenter="inbar(3)" class="inbarx">
            <img
             :src="shopshow[0].barimg3"
              alt=""
            />
          </div>
        </div>
        <div class="inShop_name">
          <p>{{ shopshow[0].biaoti }}</p>
          <div class="price">
            <span>¥</span>
            <span>{{ shopshow[0].jiaqian }}</span>
            <span>¥ {{ shopshow[0].yuanjia }}</span>
          </div>
          <div>{{ shopshow[0].dingjin }}</div>
          <div class="coupons">
            <span class="span">优惠券</span>
            <div>
              <img
                src="https://qnm.hunliji.com/o_1d745l02d1vga1r4e1k081vjef84l.png"
                alt=""
              />
              <span>¥1000</span>
              <span :plain="true" @click="open2">领取</span>
            </div>
          </div>
          <div class="pay_gift">
            <div>
              <span class="span">下单有礼</span>
            </div>
            <div>
              <p>{{ shopshow[0].xiadan1 }}</p>
              <p>{{ shopshow[0].xiadan2 }}</p>
            </div>
          </div>
          <div>
            <span class="span">咨询有礼</span>
            <span>{{ shopshow[0].zixun }}</span>
          </div>
          <div class="inshop_pay">
            <span>花呗分期</span>
            <span>花呗分期: 月供</span>
            <span>¥ {{ shopshow[0].huabei }}</span>
            <span>起</span>
          </div>
          <button @click="openMsg">询问低价</button>
        </div>
      </div>
      <div style="clear: both"></div>
      <div class="content_show">
        <div class="content_show_left">
          <div class="content_show_title">
            <div @click="item">套餐参数</div>
            <div @click="img">图文详情</div>
          </div>
          <div id="contentItem">
            <div class="package_content_title">
              <span
                class="el-icon-star-off"
                style="background-color: #ffd400"
              ></span>
              <span> 套餐指数</span>
            </div>
            <div class="package_content_item">
              <h3>团队</h3>
              <div>
                <span>策划师</span>
                <span>{{ shopshow[0].cehua }}</span>
              </div>
              <div>
                <span>监督师</span>
                <span>{{ shopshow[0].jiandu }}</span>
              </div>
              <div>
                <span>主持人</span>
                <span>{{ shopshow[0].zhuchi }}</span>
              </div>
              <div>
                <span>化妆师</span>
                <span>{{ shopshow[0].huazhuang }}</span>
              </div>
              <div>
                <span>摄影师</span>
                <span>{{ shopshow[0].sheying }}</span>
              </div>
              <div>
                <span>摄像师</span>
                <span>{{ shopshow[0].shexiang }}</span>
              </div>
              <h3>布置</h3>
              <div>
                <span>迎宾区</span>
                <span>{{ shopshow[0].yingbin }}</span>
              </div>
              <div>
                <span>仪式区</span>
                <span>{{ shopshow[0].yishi }}</span>
              </div>
              <h3>灯光舞美</h3>
              <div>
                <span>婚礼灯光</span>
                <span>{{ shopshow[0].dengguang }}</span>
              </div>
              <div>
                <span>舞美道具</span>
                <span>{{ shopshow[0].daoju }}</span>
              </div>
              <h3>补充说明</h3>
              <div>
                <span>购买须知</span>
                <span>{{ shopshow[0].goumai }}</span>
              </div>
            </div>
          </div>
          <div id="contentImg">
            <div class="package_content_title">
              <span
                class="el-icon-star-off"
                style="background-color: #ffd400"
              ></span>
              <span> 图文详情</span>
            </div>
            <div class="package_content_img">
              <p>【详细价格】，请咨询客服</p>
              <img :src="shopshow[0].img1" alt="" />
              <img :src="shopshow[0].img2" alt="" />
              <img :src="shopshow[0].img3" alt="" />
            </div>
          </div>
        </div>
        <FootRight></FootRight>
        <div style="clear: both"></div>
      </div>
    </div>
    <my-footer></my-footer>
  </div>
</template>
<script>
import FootRight from "./FootRight.vue";
export default {
  components: { FootRight },
  data() {
    return {
      shopshow: [
        { biaoti: "" },
        { jiaqian: "" },
        { yuanjia: "" },
        { dingjin: "" },
        { xiadan1: "" },
        { xiadan2: "" },
        { zixun: "" },
        { huabei: "" },
        { cehua: "" },
        { jiandu: "" },
        { zhuchi: "" },
        { huazhuang: "" },
        { sheying: "" },
        { shexiang: "" },
        { yingbin: "" },
        { yishi: "" },
        { dengguang: "" },
        { daoju: "" },
        { goumai: "" },
        { zengpin: "" },
        { img1: "" },
        { img2: "" },
        { img3: "" },
        { barimg1: "" },
        { barimg2: "" },
        { barimg3: "" },
      ],
      img1:true,
      img2:false,
      img3:false
    };
  },
  mounted() {
    let tid = this.$route.query.tid;
    this.axios.get("/in_content?tid=" + tid).then((result) => {
      this.shopshow = result.data;
      console.log(this.shopshow);
    });
  },
  methods: {
    inbar(img){
      if (img==1) {
        this.img1=true
        this.img2=false
        this.img3=false
      }else if(img==2){
        this.img1=false
        this.img2=true
        this.img3=false
      }else{
        this.img1=false
        this.img2=false
        this.img3=true
      }
    },
    item() {
      document.getElementById("contentItem").scrollIntoView();
    },
    img() {
      document.getElementById("contentImg").scrollIntoView();
    },
    openMsg() {
      if(JSON.parse(sessionStorage.getItem("is_login"))){
        this.$alert("您已登录,我们公司人员稍后会联系您", "登陆成功", {
        confirmButtonText: "确定",
      })
      }else{
        this.$router.push({
          path:'/login'
        })
      }
      
    },
    open2() {
      if(JSON.parse(sessionStorage.getItem("is_login"))){
        this.$message.success("恭喜您领取成功");
      }else{
        this.$router.push({
          path:'/login'
        })
      }
    },
  },
};
</script>
<style scoped>
/* 左上角动态图 */
.inbarx{
  width: 89px;
  height: 89px;
}
.inbarx>img{
  width: 100%;
  height: 100%;
}
.inbard>img{
  width: 480px;
  height: 360px;
}
img:hover{
  opacity: 0.8;
}
.in_shop {
  width: 1200px;
  margin: 0 auto;
}
.content_title > a {
  font-size: 12px;
  color: #999;
}
.content_title > a:hover {
  color: #f83244;
}
.content_title > span {
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}
.content_top {
  margin-top: 15px;
  position: relative;
  background: #fafafa;
}
.content_top > div:nth-child(2) > div {
  float: left;
  margin-right: 5px;
}
.inShop_name {
  position: absolute;
  top: 0;
  left: 580px;
  width: 410px;
  height: 450px;
  color: #333;
}
.inShop_name > p {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}
.price {
  font-size: 40px;
  color: #f83244;
  font-weight: bold;
}
.price > span:first-child {
  font-size: 24px;
  margin: 0 5px;
}
.price > span:last-child {
  color: #999;
  font-size: 12px;
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 15px;
}
.price + div {
  color: #666;
  font-size: 14px;
  margin: 8px 0 10px;
}
.coupons {
  position: relative;
  margin-top: 20px;
}
.coupons > div > img {
  width: 103px;
  height: 28px;
  position: absolute;
  left: 75px;
  top: 0;
}
.coupons > div span {
  position: absolute;
  color: #eff7ff;
  left: 80px;
  top: 3px;
  font-weight: bold;
}
.coupons > div span:last-child {
  left: 140px;
  top: 3px;
}
.coupons > div span:last-child:hover{
  cursor: pointer;
}
.span {
  font-size: 12px;
  color: #f83244;
  background: #fff1f6;
  padding: 1px 4px;
  margin-right: 15px;
}
.pay_gift {
  position: relative;
  margin: 30px 0;
}
.pay_gift > div:last-child {
  position: absolute;
  left: 75px;
  top: -12px;
}
.pay_gift > div:nth-child(2) > p:first-child {
  margin-bottom: 7px;
}
.inshop_pay {
  margin-top: 15px;
}
.inshop_pay > span:first-child {
  color: #13acec;
  background: #eff7ff;
  font-size: 12px;
  padding: 1px 4px;
  margin-right: 15px;
}
.inshop_pay > span:nth-child(3) {
  color: #fe7e33;
}
.inShop_name button {
  position: absolute;
  left: 0;
  bottom: 0;
  border: 1px solid #f83244;
  width: 115px;
  height: 40px;
  background: #f83244;
  border-radius: 100px;
  color: #fff;
}
button:hover{
  cursor: pointer;
}
button:focus{
  outline: none;
}
.content_show {
  margin: 40px 0;
  width: 1200px;
  margin: 0 auto;
}
.content_show_title {
  height: 52px;
  width: 840px;
  background-color: #fafafa;
}
.content_show_title > div {
  line-height: 52px;
  float: left;
  margin: 0 140px;
  transition: all 0.3s;
}
.content_show_title > div:hover {
  color: #f83244;
  cursor: pointer;
}
.content_show_left {
  float: left;
  width: 840px;
}
.content_show_left > div:not(:first-child) {
  padding: 40px 40px 0;
}
.package_content_title {
  font-weight: 700;
  font-size: 22px;
  border-bottom: 1px dashed #ddd;
  margin-bottom: 20px;
  padding-bottom: 20px;
}
.package_content_item div {
  margin-top: 10px;
}
.package_content_item h3 {
  margin-top: 20px;
}
.package_content_item div > span:first-child {
  color: #666;
  width: 96px;
  display: inline-block;
}
.package_content_item div > span:last-child {
  width: 624px;
  display: inline-block;
}
.package_content_img {
  width: 720px;
  margin: 0 auto;
}
.package_content_img > p {
  color: #333;
  margin-bottom: 50px;
}
</style>